package MetaClassifierAlgorithms;

import Definitions.GraphClass;
import Global.ConstantVariable;
import Global.GlobalClass;
import Sampling.SamplingAbstractClass;

public class MetaClassifierFactoryClass {
		
	GraphClass graph;
	GlobalClass global;
	
	double[][][] probabilityDistributionMatrixForTheClassifiers;
	
	public MetaClassifierFactoryClass(GraphClass graph, GlobalClass global, double[][][] probabilityDistributionMatrixForTheClassifiers)
	{
		this.graph = graph;
		this.global = global;
		this.probabilityDistributionMatrixForTheClassifiers = probabilityDistributionMatrixForTheClassifiers;
	}
	
	public MetaClassifierAbstractClass getMetaClassifier(String metaClassifierName, SamplingAbstractClass sampling, double[][][] probabilityDistributionMatrixForTheClassifiers)
	{
		/*get content input*/
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_AVERAGE_METHOD)
			return new AveMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_MAX_METHOD)
			return new MaxMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_LOCAL_ALPHA_METHOD)
			return new LocalAlphaBasedMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_PROD_METHOD)
			return new ProdMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_DEGREE_FILTERED_MERGE_METHOD)
			return new DegreeFilteredMetaClassifier(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_LOCAL_BETA_METHOD)
			return new LocalBetaBasedMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_LOCAL_ALPHA_MAX_METHOD)
			return new LocalAlphaMaxBasedMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		if(metaClassifierName == ConstantVariable.MetaClassifier_ConstantVariables.Methods.MC_LOCAL_BETA_MAX_METHOD)
			return new LocalBetaMaxBasedMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		//deprecated
		//return new CorrNormalizedLocalAlphaBasedMetaClassifierClass(metaClassifierName, graph, global, sampling, probabilityDistributionMatrixForTheClassifiers);
		
		
		else return null;
	}

}
